﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TestersLittleHelper
{
    class StringCreator
    {
        static public int[] Lengths { get { return _lengths; } }
        static int[] _lengths = { 10, 
                                    99, 100, 101,
                                    127, 128, 129,
                                    255, 256, 257,
                                    999, 1000, 1001,
                                    0xFFFF - 1, 0xFFFF, 0xFFFF + 1,
                                    0xFFFFFF - 1, 0xFFFFFF, 0xFFFFFF + 1,
                                    0xFFFFFFF - 1, 0xFFFFFFF, 0xFFFFFFF + 1
                                };

        internal static void CreateStringInClipboard(int p)
        {
            if (p < 1)
                throw new Exception("Only excepts positive numbers");
            var str = "";
            if(p==1) str = "1";
            else if(p==2) str = "2*";
            else{
                str = String.Format("{0}*",p);;
                while (str.Length < p) {
                    str = String.Format("{0}*{1}", p - str.Length, str);
                }
                str = str.Substring(str.Length - p, p);
            }
            
            
            System.Windows.Forms.Clipboard.SetDataObject(str,true,10,50);
            
        }
    }
}
